<?php
/* @var $this CompanyExtendController */
/* @var $model CompanyExtend */

$this->breadcrumbs=array(
    'Company Extends'=>array('index'),
    'Create',
);
 
?>
<script type="text/javascript">
    $(document).ready(function(e) { 
        if(<?php echo isset($code)?"true":"false" ?> ){ 
           setTimeout(function(){$('.phonesview').click()},500) ;
        } 
    }); 
</script>
<h1>应用下载信息设置</h1> 
 
 <div class="form allrow">
 
<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'company-extend-form',
    'enableAjaxValidation'=>false, 
    'htmlOptions' => array('enctype'=>'multipart/form-data'),
)); ?>
  <p style="color: red;font-size: 14px;"> <?php echo empty($message)?'':''.$message; ?></p>
    <p class="note"><span class="required">*</span> 是必填内容.</p>  

     <div class="row">
        <?php echo CHtml::label("应用图标",false,array('required'=>true)); ?>
        <?php echo CHtml::fileField('appicon'); ?>
        <?php echo CHtml::hiddenField('oappicon',empty($model['appicon'])?'':$model['appicon']); ?> 
        <?php echo CHtml::label("建议：200px * 200px",false); ?> 
    </div>

     <div class='row'> 
        <?php  
          if(!empty($model['appicon'])){ 
            echo CHtml::label("应用icon预览",false); 
            echo CHtml::image(Yii::app()->baseUrl.$model['appicon'],'',array("width"=>"100px","height"=>"100px")); 
          }  
         ?>
    </div> 

     <div class="row">
        <?php echo CHtml::label("应用名称",false,array('required'=>true)); ?>
        <?php echo CHtml::textField('appname',empty($model['appname'])?'':$model['appname']); ?> 
    </div>  

    <div class="row">
        <?php echo CHtml::label("应用简介",false,array('required'=>true)); ?>
        <?php echo CHtml::textArea('appcontent',empty($model['appcontent'])?'':$model['appcontent'],array('rows'=>6, 'cols'=>50));  ?> 
    </div>  

    <div class="row">
        <?php echo CHtml::label("android网址",false,array('required'=>true)); ?>
        <?php echo CHtml::textField('appandroidurl',empty($model['appandroidurl'])?'http://':$model['appandroidurl']); ?> 
    </div>   

    <div class="row">
        <?php echo CHtml::label("ios网址",false,array('required'=>true)); ?>
        <?php echo CHtml::textField('appiosurl',empty($model['appiosurl'])?'http://':$model['appiosurl']); ?> 
    </div>   
      <div class="row buttons">
          <?php echo CHtml::submitButton('维护',array('class'=>'subButton')); ?>
      </div>
<?php $this->endWidget(); ?>
</div><!-- form -->